Filter On Object History

Is it possible to apply filter on object history.

e.g. If I am iterating history on object after time t1.
SystemAdmin - Thu Mar 03 04:48:05 EST 2011

Re: Filter On Object History
Mathias Mamsch - Thu Mar 03 05:04:10 EST 2011

Not with DOORS on-board means. You can write a script that will display relevant parts of the history in a DXL layout column and then filter on the contents of that column. Or you can write a custom filter script, which will reject / accept object regarding the criteria you specified. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Filter On Object History
SystemAdmin - Thu Mar 03 05:50:22 EST 2011

Do you need to filter history with DXL?

The History tab on the File > Module Properties dialogue box or the Edit > Object > properties dialogue box will let you filter all history records between two dates - you can also export history data which is tab separated and can be viewed within MSExcel where you can apply more advanced filtering if required. Some history records when viewed from the File > Module Properties dialogue box can be read-locked if the object they are referring to has also been deleted - so if you need to be able to read every history record of every object you will need to login as the Administrator user.

Also - every version of a DOORS module only captures the history of that version and not the entire history across all preceding versions.


Paul Miller
Melbourne, Australia

Re: Filter On Object History
SystemAdmin - Thu Mar 03 23:32:40 EST 2011

Mathias Mamsch - Thu Mar 03 05:04:10 EST 2011
Not with DOORS on-board means. You can write a script that will display relevant parts of the history in a DXL layout column and then filter on the contents of that column. Or you can write a custom filter script, which will reject / accept object regarding the criteria you specified. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Does it possible to iterate history of objects in reverse order. (Means if I iterate history in objects then it will get history whiich is latest and then latest-1 and so on...)

Thanks,
Hardik Shah

Re: Filter On Object History
SystemAdmin - Thu Mar 03 23:42:29 EST 2011

SystemAdmin - Thu Mar 03 23:32:40 EST 2011
Does it possible to iterate history of objects in reverse order. (Means if I iterate history in objects then it will get history whiich is latest and then latest-1 and so on...)

Thanks,
Hardik Shah

Can you explain why you need to iterate through the object history?

There might be an easier solution if you can explain why you want to do this.

Are you familiar with DOORS module and object level history records?


Paul Miller
Melbourne, Australia

Re: Filter On Object History
llandale - Fri Mar 04 13:39:43 EST 2011

SystemAdmin - Thu Mar 03 23:32:40 EST 2011
Does it possible to iterate history of objects in reverse order. (Means if I iterate history in objects then it will get history whiich is latest and then latest-1 and so on...)

Thanks,
Hardik Shah

No. Cannot also remember the "history" variable.

This is what I did: 1st loop iterates through History counting history records looking for the History in question, perhaps "Modify Object" for attribute "Object Text". Keep track of the last count found; so if there were 300 Histories and #29 and #260 qualified, you'd remember #260. 2nd loop iterates through History counting, stoping at #260 and dealing with that one as the "last" one.

What luck, I have the function here:

//*********************
bool    fHistReadLocked(History hst)
{     // Is the History Read Locked to the current User?
        if (null hst) return(true)
        int     Session = hst.sessionNo         // Returns -1 if Read Locked
        return(Session < 0)  // Read Locked if Session number is not valid positive integer
}     // end fHistReadLocked()
 
 
//***************************
bool    fHistIsAttrDefn(History hst)
{     // Does the history record have an Attribute Definition Name associated with it?
        HistoryType     ht = hst.type
        return( ht == createAttr        or
                ht == modifyAttr        or
                ht == deleteAttr        or
                ht == modifyObject
                )
}     // end fHistIsAttrDefn()
 
//***************************
bool    fHistIsAttrType(History hst)
{     // Does the history record have an Attribute Type Name associated with it?
        HistoryType     ht = hst.type
        return( ht == createType        or
                ht == modifyType        or
                ht == deleteType
                )
}     // end fHistIsAttrType()
 
 
//***************************
string  fHistGetAttrName(History hst)
{     // Get the Attribute Name (or type), if any, associated with the History
        string  NameAttr
        noError()
        if(null hst)
             NameAttr = ""
        elseif(fHistIsAttrDefn(hst))
             NameAttr = hst.attrName
        elseif(fHistIsAttrType(hst)) 
             NameAttr = hst.typeName
        else NameAttr = ""
        if (null NameAttr) NameAttr = ""      // Fixes weird bug
        if (!null lastError())
        {    NameAttr = ""
        }
        return(NameAttr)
}    // end fHistGetAttrName()
 
 
 
 
 
//***********************
History fHistGetNewestHist(Object obj, string NameAttr)
{    // Get the History of the latest modified date for the object's attribute.
        // Only attributes that log history will be found.
        // Returns null if no such History is found since the last module baseline.
        //    (Ignores previous baselines)
 
        History hst, hstFound, hstNull = null
        HistoryType     ht
        Object  oInSkip
        string  HistDate, NameAttrHist
        int     CountHist, CountFound
 
        if (null obj or null NameAttr) return(hstNull)
// print "fHistGetNewestHist start, Obj-NameAttr = " (identifier(obj)) "\t'" NameAttr "'\n"
        CountHist       = -1
        CountFound      = -1
        for hst in obj do
        {  CountHist++
           if (fHistReadLocked(hst))    continue        // Read Locked, unreadable
           ht   = hst.type
           if (ht != modifyObject)      continue        // Not modify History
           if (fHistGetAttrName(hst) != NameAttr) continue      // Modifies some other attribute
                                // ** History modifies this Object Attribute
           CountFound   = CountHist             // Found, but keep looking for more recent modification
        }    // end for all this object's History
 
        if (CountFound < 0) return(hstNull)
                                // Now we know the History Counter of the History we want.
                                // Go back through and find that History
 
        CountHist = -1
        for hst in obj do
        {  CountHist++
           if (CountHist == CountFound)
              return(hst)
        }
        print ">>fHistGetNewestHist program error; CountFound not actually found\n"
        return(hstNull)
}    // end fHistGetNewestHist()


Old function, needs comment improvements.

 

 

  • Louie